package com.rxmvp.baselibrary.base;

import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;

import com.squareup.picasso.Picasso;
import com.squareup.picasso.Target;


/**
 * 作者： huangRZ  日期： 2017/2/24. email：917647409@qq.com
 * Explain：picasso库中的target实现类，自己处理获取的bitmap图片
 */

public abstract class BaseTarget implements Target {

    @Override
    public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
        onBitmapLoadedSuccess(bitmap);
    }

    @Override
    public void onBitmapFailed(Drawable errorDrawable) {

    }

    @Override
    public void onPrepareLoad(Drawable placeHolderDrawable) {

    }

    public abstract void onBitmapLoadedSuccess(Bitmap bitmap);
}
